import click
import json
from pprint import pprint
from app.callback.script.callback_click import CallBackClick


@click.group()
def callback_alarm():
    pass


@callback_alarm.command("pod_self_healing")
@click.option('--data', type=str, help="prometheus alarm data, json.dumps(data)")
def pod_self_healing(data):
    """
    pod故障自愈
    python manage.py pod_self_healing --data json.dumps(data) --token ""
    """
    data = json.loads(data)

    callback_click = CallBackClick()
    callback_click.pod_self_healing(data)
